package Operation;

import Book.BookDao;

import java.sql.SQLException;
import java.util.Scanner;

public class ReturnOperation implements IOperation {

    @Override
    public void work() throws SQLException {
        System.out.println ("归还书籍");
        Scanner scanner=new Scanner (System.in);
        System.out.println ("请输入要归还的书籍id");
        int bookID=scanner.nextInt ();
        BookDao bookDao=new BookDao ();
        boolean ret=bookDao.returnBook (bookID);
        if(ret)
        {
            System.out.println ("还书成功");
        }else {
            System.out.println ("还书失败");
        }
    }
}
